/**
 * @author adagys
 */

package com.eu.chipin.backend.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class ChipinOpenHelper extends SQLiteOpenHelper {
	
    private static final int DATABASE_VERSION = 2;

    ChipinOpenHelper(Context context) {
        super(context, DB.DATABASE_NAME, null, DATABASE_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
    	// Create tables
        db.execSQL(Schema.SQL_TRIPS);
        db.execSQL(Schema.SQL_PURCHASES);
        db.execSQL(Schema.SQL_PARTICIPANTS);
        db.execSQL(Schema.SQL_MEMBERS);
        db.execSQL(Schema.SQL_BUYERS);
        db.execSQL(Schema.SQL_CHIPPERS);
    }

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub
		
	}
}